package com.ruoyi.project.mapper;

import com.ruoyi.experiment.domain.Circulation;
import com.ruoyi.experiment.domain.Experiment;
import com.ruoyi.experiment.domain.Sample;
import com.ruoyi.finance.model.Price;
import com.ruoyi.project.model.BriefProject;
import com.ruoyi.project.model.ExperimentDetails;
import com.ruoyi.project.model.PExperiment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface HandleMapper {

    List<BriefProject> selectBriefProject(BriefProject project);
    List<ExperimentDetails> listExperimentDetails(ExperimentDetails experimentDetails);
    List<PExperiment> selectPostByProjectId(PExperiment post);
    List<PExperiment> selectPostByProjectId2(PExperiment post);

    Integer getTypeById(Long id);
    int updateType(@Param("id")Long id,@Param("type")Integer type);

    List<PExperiment> selectExperimentByProjectId(PExperiment experiment);
    List<PExperiment> selectExperimentByProjectId2(PExperiment experiment);
    //统计未完成实验数目
    Integer countExperiment(Long pid);
    void finishProject(Long pid);

    void insertFlume(Circulation circulation);
    Long selectPidByEid(Long eid);

    Integer hasAdmin(Long userid);

    //树状查询当前样品的所有子样品id;

    List<Long> selectRootSampleByProjectId(Long id);

    List<Long> selectSampleIdByParentId(Long id);

    List<Experiment> selectExperimentsBySampleIds(List<Long> ids);

    Price selectSumPrice(Long id);

    Price selectProjectPrice(Long id);

    Integer countUnFinishSample(Long pid);
}
